package com.quwan.app.controller;

import com.quwan.app.service.ActivityService;
import com.quwan.app.vo.SignInDTO;
import com.quwan.common.BaseController;
import com.quwan.common.exception.ExpCode;
import com.quwan.common.result.ApiResult;
import com.quwan.entity.TActivity;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpServletRequest;

/**
 * @author quan
 * @date 2021-11-21 16:00
 */
@Api(tags = "App活动")
@RestController
@RequestMapping("app/activity")
@RequiredArgsConstructor
public class ActivityController extends BaseController {
    private final ActivityService activityService;


   @ApiOperation("签到周表")
    @PostMapping("dd/date")
    public ApiResult<SignInDTO> DDSignInList(HttpServletRequest request){
        return ApiResult.success( activityService.ddSignList(getId(request)));

    }

    @ApiOperation("会员签到")
    @PostMapping("dd/signIn")
    public ApiResult memberActivitySignIn(HttpServletRequest request) {

        return ApiResult.success(activityService.activitySignIn(getId(request)));

    }
}
